
# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
maintainer="team/kde <bribbers@disroot.org>"
pkgname=ghostwriter
pkgver=24.08.2
pkgrel=0
pkgdesc="Distraction-free markdown editor"
url="https://invent.kde.org/office/ghostwriter/"
arch="aarch64 x86_64"
license="GPL-3.0-or-later"
depends="qt6-qtsvg"
makedepends="
	extra-cmake-modules
	hunspell-dev
	kconfigwidgets-dev
	kcoreaddons-dev
	kdoctools-dev
	kxmlgui-dev
	qt6-qt5compat-dev
	qt6-qtbase-dev
	qt6-qtsvg-dev
	qt6-qttools-dev
	qt6-qtwebchannel-dev
	qt6-qtwebengine-dev
	samurai
	sonnet-dev
	"
subpackages="$pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/office/ghostwriter.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/ghostwriter-$pkgver.tar.xz"
# No tests
options="!check"

build() {
	CXXFLAGS="$CXXFLAGS -flto=auto" \
	cmake -B build -G Ninja \
		-DBUILD_WITH_QT6=ON \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-Wno-dev
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
556a79cd7784aa2f409031b19961d64dae8a26be32efee4ff8734c3a6b5305dab8988584eefd03976e24943f6dbaa79a85b2904354e1aa2c636b1e84edfa4266  ghostwriter-24.08.2.tar.xz
"
